/**
 * This file is Copyright © 2008 Software Craftsmen Limited. All Rights Reserved.
 */
package com.softwarecraftsmen.cachecontrol;

import com.softwarecraftsmen.cachecontrol.keys.Key;
import org.jetbrains.annotations.NotNull;

public class CacheAndKey<V>
{
	private final Cache<V> cache;
	private final Key<V> key;

	public CacheAndKey(@NotNull final Cache<V> cache, @NotNull final Key<V> key)
	{
		this.cache = cache;
		this.key = key;
	}

	public @NotNull	Item<V> put(@NotNull final V value)
	{
		return cache.store(key, value);
	}
}
